﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Tools
{
    public class Verification
    {
        // 判断是否为数字,利用正则表达式
        public static bool IsNumber(string item)
        {
            bool v = Regex.IsMatch(item, @"(^-?[0-9]{1,}$)|(^-?[0-9]{1,}\.{1}[0-9]{1,}$)");
            return v;
        }
    }
}
